﻿using Susha.Models.Helpers;
using Susha.Models.Pages;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace Susha.Areas.Default.Controllers
{
    public class NewsController : Controller
    {
        //
        // GET: /Default/News/

        public ActionResult Index(Int32? id)
        {
            Int32 iD;
            Int32.TryParse(id.ToString(), out iD);

            NewsPage page = new NewsPage(); 
            page.NewNews = NewsRepository.GetNewsById(iD);

            return View(page);
        }

    }
}
